07. Generalized Uniform Distribution

Generalized Uniform Distribution

Question:

Start Quiz:

#  Modify your code to create probability vectors, p, of arbitrary 
#  size, n. Use n=5 to verify that your new solution matches 
#  the previous one.

p=[]
n=5

print p

User's Answer:

(Note: The answer done by the user is not guaranteed to be correct)

#  Modify your code to create probability vectors, p, of arbitrary 
#  size, n. Use n=5 to verify that your new solution matches 
#  the previous one.

n=5
p=[1.0/n for i in range(0,n)]

print p
Solution: